package service.impl;
import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import pojo.Customer;
import dao.CustomerDao;
import service.CustomerManager;
@Service("customerManager")
public class CustomerManagerImpl implements CustomerManager{
	@Autowired
	private CustomerDao customerDao;

	public Customer addCustomer(Customer c) {
		c.setId(UUID.randomUUID().toString());
		return customerDao.addCustomer(c);
	}

	public Customer updateCustomer(Customer c) {
		return customerDao.updateCustomer(c);
	}

	public List<Customer> findAllCustomers() {
		return customerDao.findAllCustomers();
	}

	public Customer deleteCustomer(String id) {
		return customerDao.deleteCustomer(id);
	}
}
